<!DOCTYPE html>
<html lang="en" xmlns:v-bind="http://www.w3.org/1999/xhtml">
    <head>
        <meta charset="UTF-8">
        <title>使用v-if</title>
    </head>
    <body>
        <!-- view层模版 -->
        <div id="app">
            <!-- v-if -->
            <!-- <h1 v-if="ok">Yes</h1> -->
            <!-- <h1 v-else>No</h1> -->
            <h1 v-if="type==='A'">A</h1>
            <h1 v-else-if="type==='B'">B</h1>
            <h1 v-else>其他</h1>

        </div>
        <!-- 导入vue.js -->
        <script src="https://cdn.jsdelivr.net/npm/vue@2.6.11"></script>
        <script>
            Vue.config.devtools = true
            let vm = new Vue({
                el: "#app",
                // model：数据
                data: {
                    // ok:true
                    type: 'A'
                }
            });
        </script>
    </body>
</html>